package cn.yoyo.service;

import cn.yoyo.entity.Book;
import cn.yoyo.entity.Hot;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

public interface BookService {
    public List<Book> findAll();

    public Book findById(Integer bookid);

    public List<Book> findByPage(Integer start, Integer num);

    public int add(Book book, MultipartFile file);

    public int update(Book book, MultipartFile file);

    public Object showImg(String id);

    public int totalPage(Map<String, Object> map);

    public List<Book> findIf(Integer start, Integer num, String keyWord);

    public List<Book> findBookByPage(Integer start, Integer num, Integer typeid);

    public List<Book> findRate5();

    public List<Book> findSale5();

    public List<Book> findFav5();

    public List<Book> findBookByPageRate(Integer start, Integer num, Integer typeid);

    public List<Book> findBookByPageSale(Integer start, Integer num, Integer typeid);

    public List<Book> findBookByPageFav(Integer start, Integer num, Integer typeid);

    public int delete(Integer id);
}
